home *** CD-ROM | disk | FTP | other *** search
- #!/usr/local/bin/perl
-
- unshift (@INC, "/usr/local/etc/httpd/cgi-bin/Library");
- require "cgi-lib.pl";
- &ReadParse(*MYDATA);
-
-
- $customer_service_email = "selena\@eff.org";
- $mail_program = "mail";
- $get_info_who = "access.temp";
-
-
- if ($MYDATA{'type'} eq "order")
- {
-
-
- open (NOTE, ">$get_info_who") || &open_error($get_info_who);
-
- print NOTE "Someone placed an order!\n\n";
- print NOTE " Name: $MYDATA{'name'} \n";
- print NOTE " Product: $MYDATA{'product'} \n";
-
- close (NOTE);
-
-
- system ("$mail_program -s Order $customer_service_email< $get_info_who");
-
-
- print "Content-type: text/html\n\n";
- &HTML_response(order);
-
- } # This is the end of the if test for ordering.
-
-
- if ($MYDATA{'type'} eq "comment")
- {
- open (NOTE, ">$get_info_who") || &open_error($get_info_who);
-
- print NOTE "Someone sent in a comment!\n\n";
- print NOTE " Name: $MYDATA{'name'} \n";
- print NOTE " Comment: $MYDATA{'comment'} \n";
-
- close (NOTE);
-
-
- system ("$mail_program -s Comment $customer_service_email< $get_info_who");
-
- print "Content-type: text/html\n\n";
- &HTML_response(comment);
- } # This is the end of the if test for comments.
-
-
- sub open_error
- {
-
-
- local ($filename) = @_;
-
-
- print "I am really sorry, but for some reason I was unable to open
- <P>$filename<P> Would you please make sure that the filename is
- correctly defined in define_variables.pl, actually exists, and has
- the right permissions relative to the web browser. Thanks!";
- die;
- }
-
-
- sub HTML_response
- {
- local ($type) = @_;
- print "<HTML><HEAD>";
- print "<TITLE>Feedback Response</TITLE></HEAD><BODY> \n";
- print "<H2><CENTER>Thanks for your $type, someone will get back to
- you asap</CENTER></H2>";
-
-
- unlink ($get_info_who);
-
-
- die;
- }
-
-